Websydian v6.1 online documentationOnline documentation - Websydian v6.5

Problem - Memory errors reported by Websydian TransacXML application

Severity High
Product Websydian TransacXML
Websydian version 4.01, 5.5, 5.5 SP1
Resolved in v5.6
Plex version na
Platform Windows
Category TransacXML
Problem After creating a large number of XML documents the Websydian application fails with a memory error.
Answer The problem is that the TerminateDom function does not correctly clean up the memory area of the XML Documents.
Workaround Complete the following steps to create a workaround for the problem.

 

  1. Create a function "MyTerminateDom":

    MyTeminateDom is a FNC WSYDOM/DomAbstract.BasicFunctionShell

    Insert the following code in the edit point "API call to VB script source code":

    API Call Source code: WSYDOM/XmlParsers.MSXML.UnInitialize.UnInitialize
    - Map with Output/Output<ExceptionCode>
     
  2. Create a source code object that will hold Java source code to handle the Java part of the UnInitialize

    MyJavaUnInitialize parameter FLD ExceptionCode


    Add the following source code to the source code object.
     

    import com.websydian.xml.services.*;


    &(1:).set(new ObIntFld(0));
    try {
    Environment.TerminateDOM();
    }
    catch (Environment.Exception e) {
    ErrorStack.Push(e.getMessage());
    &(1:).set(new ObIntFld(Constants.InitEx));
    }
     

  3. Insert the following code in the edit point "API call to java source code":

    API Call Source code: MyJavaUnInitialize
    - Map with Output/Output<ExceptionCode>
     
  4. Replace the function DomServices.TerminateDom with MyTerminateDom for all functions calling DomServices.TerminateDom:

    MyFunction replaces FNC WSYDOM/DomServices.TerminateDom
    ...by MyTerminateDom

     


Please note that TerminateDom is called by the abstract functions ExportXmlDocument, ImportXmlDocument, SoapProcessor, and SoapGenerator.

It is very important that TerrminateDom is replaced on all functions inheriting from these functions and on all of your own functions calling the TerminateDom function.